package com.java01.lang.hash;

import java.util.Hashtable;
import java.util.Map;
import java.util.Map.Entry;

/**
 * Get entries from a hash
 * Fetch key-value pair from a hashtable efficiently. 
 */
public class Entry1 {

	public static void main(String[] args) {
		Map<String,String> hash = new Hashtable<String,String>();
		hash.put("a", "apple");
		hash.put("b", "banana");
		hash.put("c", "cherry");
		
		for(Entry<String, String> entry:hash.entrySet()){
			System.out.println(entry.getKey()+"=>"+entry.getValue());
		}
	}
}
